<form method="post" action="/biz/datasource/config/add" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, pageRefresh)">
    <input type="hidden" id="cmd5" name="cmd5" value="">
    <input type="hidden" id="uid" name="uid" value="">
    <input type="hidden" id="randomData" name="randomData" value="">
    <div class="ibox no-margins no-padding no-borders">
        <div class="ibox-title p-xs ljFixBoxTitle">
            <div class="btn btn-sm btn-primary pull-right" id="btnAddSubmit"><i class="fa fa-paste">添加数据源配置表</i></div>
        </div>
        <div style="height:40px;"></div>
        <div class="ibox-content">
            <div class="row">
                <div class="form-group col-md-6"><label>数据库类型(<b class="text-danger">*</b>):</label>
                    <select name="dbType" data-placeholder="请选择数据库类型" class="form-control chosen-select required" style="width:100%;">
                        <option value="" th:selected="${dbType == null}">--请选择数据库类型--</option>
                        <option th:each="item:${@lj.group('DbType')}" th:value="${item.codeKey}">[[${item .codeValue}]]
                        </option>
                    </select>
                </div>
                <div class="form-group col-md-6"><label>数据库驱动(<b class="text-danger">*</b>):</label>
                    <input name="driverClass" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
                <div class="form-group col-md-6"><label>数据库名称(<b class="text-danger">*</b>):</label>
                    <input name="dbName" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-6"><label>数据库host(<b class="text-danger">*</b>):</label>
                    <input name="host" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
                <div class="form-group col-md-6"><label>数据库端口(<b class="text-danger">*</b>):</label>
                    <input name="port" type="text" placeholder="" class="form-control input-sm required" maxlength="32">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-6"><label>数据库用户名(<b class="text-danger">*</b>):</label>
                    <input name="username" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
                <div class="form-group col-md-6"><label>数据库密码(<b class="text-danger">*</b>):</label>
                    <input name="password" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    jQuery(function ($) {
        $(".chosen-select").chosen();
        $("#btnAddSubmit").on("click", function () {
            var values = {};
            modifyVerf(values);
            $("#cmd5").val(values.cmd5);
            $("#uid").val(values.uid);
            $("#randomData").val(values.randomData);
            $(this).closest("form").submit();
        });
    });
</script>